<?php
namespace App\Console\Commands;

use App\Models\Ai\AiTaskModel;
use App\Models\Client\ClientUserModel;
use App\Models\Team\TeamModel;
use App\Services\Ai\AiAgentService;
use App\Services\CallbackRequest\CallbackRequestService;
use App\Services\Captcha\src\Captcha;
use App\Services\MediaInfo\MediaInfoService;
use App\Services\Oss\OssService;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Qiniu\Auth;

class BinTestCommand extends Command
{

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'bin_test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $descriptioockn = '测试命令类';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $this->callbackTest();
    }

    public function callbackTest(){
        $url = 'https://yewuleida.top/api.php/callback/payBack';
        // 解析 URL 中的域名和路径
        // $parsedUrl = parse_url($url);
        // $domain = ($parsedUrl['scheme'] ?? 'http') . '://' . ($parsedUrl['host'] ?? '');
        // $path = $parsedUrl['path'] ?? '';

        // // 输出解析结果（可根据实际需求修改）
        // $this->info("域名: {$domain}");
        // $this->info("路径: {$path}");
        $result= (new CallbackRequestService())->setParams([
            'url' => $url,
            'data' => [
                'a' =>  21312312,
                'b' =>  [
                    'c'  =>  'asdasdas'
                ]
            ]
        ])->send();
        $this->info($result);
    }
}
